package com.xzx.study;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ListViewArrayAdapterActivity extends AppCompatActivity {

    private ListView listView1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_list_view_array_adapter);
        String[] data = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "G"};
        listView1 = findViewById(R.id.listView1);
        listView1.setAdapter(new ArrayAdapter<>(this, R.layout.item_list_view_array_adapter, data));
    }

}
